#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
int my_memcmp(const void* str1,const void* str2,size_t num)
{
	assert(str1 != NULL);
	assert(str2 != NULL);
	while(num--)
	{
		if(*(char*)str1 != *(char*)str2)
		{
			return (*(char*)str1 - *(char*)str2);
		}
		str1 = (char*)str1 + 1;
		str2 = (char*)str2 + 1;
	}
	return 0;
}
int main()
{
	int arr1[] = {1,2,3,4,5,6,7,8,9,10};
	int arr2[] = {1,2,2,5,6,7,8,9,10};
	printf("%d\n",my_memcmp(arr1,arr2,32));
	return 0;
}